<?php
$from = (($page - 1) * max_news);
$select = 'name,name_rewrite,url_hinh,description';
$table = 'info';
$where = "`delete`=0 AND status=1 AND menu_id LIKE '%,".$row_menu_one['id'].",%'";
$limit = "LIMIT {$from},".max_news;

include_once('blocks/navigator.php');
$view_post .= '<div id="tuvan_sk">';
$list = $tc->list_item($select,$table,$where,$limit);
$total = mysql_num_rows($list);
if($total>1){
	while($row = mysql_fetch_array($list)){
	$view_post .= '
		<div class="item_info">
			<a href="'.$row_menu_one['url'].$row['name_rewrite'].'.html"><img src="'.url_articles_thumb_image.$row['url_hinh'].'" alt="'.$row['name'].'" />
			<h3>'.$row['name'].'</h3></a>
			<div>'.$row['description'].'</div>
		</div>';
	}
	$view_post .= '<div style="clear:both; height:1px"></div></div>';
	mysql_free_result($list);
	$phantrang = $tc->phantrang($row_menu_one['url'],$page,max_news,'id',$table,$where);
	$view_post .= "<div id=\"phantrang\">{$phantrang}</div>";
}elseif($total==1){
	$row = mysql_fetch_array($list);
	header('location:http://'.$row_config['domain'].'/'.$row_menu_one['url'].$row['name_rewrite'].'.html');
}else $view_post .= '<p style="padding:20px 50px 500px">Thông tin đang được cập nhật..</p>';